import ebooklib
from ebooklib import epub
from bs4 import BeautifulSoup

book = epub.read_epub('1000brains.epub')
# for item in book.get_items():
#     print(item)
#
# print(book.get_metadata('DC', 'title'))

for html in book.get_items_of_type(ebooklib.ITEM_DOCUMENT):
    # print(html)
    print(html.get_name())
    # print(html.get_content())
    soup = BeautifulSoup(html.get_content(), 'lxml')
    print(soup)
